import request from "./request.js";

/**
 * 首页，司机总的统计
 * @param {number} userID - 司机id  
 */
export const apiTotal = (userID)=>  request('/driver/list', {userID}, {method: 'post'})

//按月、日统计
export const apiCounts = (userID, startTime, endTime)=> request('/', {userID, startTime, endTime})

//登录
export const apiLogin = phone => request('/driver/login', {phone}, {method: 'post', showLoading: true})




//土方查询-按日
export const todayCount = (userID) => request('/driver/todayCount', {userID}, {method: 'get', showLoading: true})
//土方查询-按月
export const countByMonth = (userID,time) => request('/driver/countByMonth', {userID,time}, {method: 'get', showLoading: true})

//土方增加
export const countAdd = (userID,type) => request('/driver/countAdd', {userID,type}, {method: 'post', showLoading: true})


// 加油

// 模糊查询车辆
export const queryCar = (car_id) => request('/driver/queryCar', {car_id}, {method: 'get', showLoading: true})

//新增加油数据
export const oliAdd = (car_id,olier_id,count) => request('/oli/oliAdd', {car_id,olier_id,count}, {method: 'post', showLoading: true})